Disable memory swapping on Linux servers #3381
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Short description of changes
Updated systemd unit file to disable swap on Jamulus process.
CHANGELOG: Server: Disabled swap memory usage on Linux.
Context: Fixes an issue?
I noticed that Jamulus server randomly (intermittently) become unresponsive for 0.3 – 1 seconds every once in a while. (This issue has happened for a long time prior.) This caused everyone to experience some sound drops (we call it "ตกหลุมอากาศ," an aviation term that refers to the experience of a cruising plane hitting an air pocket causing turbulence).
Last month I installed Netdata on my servers to collect detailed metrics. It seems that Linux has been paging some memory to/from disk every once in a while around the unresponsiveness occurs.
So systemd has the ability to prevent an app from using swap space. This might help with this issue. From my preliminary testing, it seems to have helped, albeit not completely.
As memory footprint of Jamulus server is very minimal (19.7M used after 8 months of uptime) I think this config change should not have any negative impact unless the server is run on a potato.
Does this change need documentation? What needs to be documented and how?
No.
Status of this Pull Request
Ready
What is missing until this pull request can be merged?
N/A
Checklist